import 'element-ui/lib/theme-chalk/base.css';
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/style.css'
import './assets/font/font.css'
import './plugins/element.js'

import ElementUI from 'element-ui'
import locale from 'element-ui/lib/locale/lang/en'

Vue.use(ElementUI, { locale })

if (process.client) {
  var firebaseConfig = {
    apiKey: "AIzaSyBpbiIJAZvoM4AJ-mwxsQKzTs4ZsbiSogI",
    authDomain: "freenovel-1bd60.firebaseapp.com",
    projectId: "freenovel-1bd60",
    storageBucket: "freenovel-1bd60.appspot.com",
    messagingSenderId: "644058665917",
    appId: "1:644058665917:web:f0fee57b3a2b0306a978d4",
    measurementId: "G-LSS90Q6Q8F"
  };
// Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();
}


//谷歌登陆
import GSignInButton from 'vue-google-signin-button'
Vue.use(GSignInButton);

//脸熟登陆
import FBSignInButton from 'vue-facebook-signin-button'
Vue.use(FBSignInButton)



// 饿了么动画
Vue.component(CollapseTransition.name, CollapseTransition)
Vue.config.productionTip = false


new Vue({
  router,
  store,
  render: h => h(App),
  mounted () {
    document.dispatchEvent(new Event('render-event')) // 预渲染
    // document.dispatchEvent(new Event('custom-render-trigger')) // 预渲染
  }
}).$mount('#app')
